#!/usr/bin/perl

my $a;
my $b;

sub printa
{
  print $a . "\n";
}

sub printb
{
  print $b . "\n";
}

sub incab
{
  $a = $a + 1;
  $b = $b + 1;
}

$a = 42;
$b = 21;
printa();
printb();
incab();
printa();
printb();